/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#ifndef INCLUDE_SHADER_OBJECT
#define INCLUDE_SHADER_OBJECT

#include "shader_std.h"
#include "shader_curve.h"


#ifdef __cplusplus

//#include <向量.h>

// GLSL Type
using uint = unsigned int;
using uint64_t = uint64;

#define inout

#else

#define Inline

layout(buffer_reference, scalar) readonly buffer R_GlobalParameter { S_GlobalParam GlobalParamAddress[]; };
layout(buffer_reference, scalar) readonly buffer B_Indexs          { uvec3 I[]; };
layout(buffer_reference, scalar) readonly buffer B_UV              { vec2 UV[]; };

layout(buffer_reference, scalar) readonly buffer R_GlobalParameter_CurevPoint { S_CurvePoint  curvePointPtr[]; };


layout(buffer_reference, scalar) readonly buffer R_GlobalParameter_LigthParallel { S_LigthParallel LigthParallelPtr[]; };
layout(buffer_reference, scalar) readonly buffer R_GlobalParameter_LigthPoint    { S_LigthPoint    LigthPointPtr[]; };
layout(buffer_reference, scalar) readonly buffer R_GlobalParameter_LigthArea     { S_LigthArea     LigthAreaPtr[]; };
layout(buffer_reference, scalar) readonly buffer R_GlobalParameter_LigthSpot     { S_LigthSpot     LigthSpotPtr[]; };

layout(buffer_reference, scalar) readonly buffer R_GlobalParameter_Material      { int           MaterialPtr[]; };
layout(buffer_reference, scalar) readonly buffer B_Faces                         { S_FaceElement Element[]; };
//layout(buffer_reference, scalar) readonly buffer B_Faces                         { S_CurvePoint CurvePoint[]; };


layout(binding = DEF_TexturesBindID) uniform  sampler2D Ts[];

layout(binding = DEF_BINDING_Render_Geom,        scalar, buffer_reference_align = 4) readonly buffer B_Geom { S_Geom gGeom[]; };
layout(binding = DEF_ObMeshBindID,               scalar) readonly buffer B_ObjMesh       { S_ObMesh m_Address[]; } ObMesh;
layout(binding = DEF_ParallelLightBindID,        scalar) readonly buffer B_LigthParallel { S_LigthParallel L[]; } LigthParallel;
layout(binding = DEF_MaterialsBindID,            scalar) readonly buffer B_Material      { S_Material m_Material[]; };
layout(binding = DEF_BINDING_Render_GlobalParam, scalar) readonly buffer B_GlobalParam   { S_GlobalParam gGlobalParam; };


#endif
















#endif

